import request from "@/utils/request";

// 查询标段列表
export function listBsBd(query) {
  return request({
    url: "/base/bsBd/list",
    method: "get",
    params: query
  });
}
// 获取标段下拉
export function queryBdSelect(query) {
  return request({
    url: "/base/bsBd/getList",
    method: "get",
    params: query
  });
}
// 根据项目id获取标段-站点树
export function queryBdTree(query) {
  return request({
    url: "/base/bsBd/bdTreeList",
    method: "get",
    params: query
  });
}
// 根据获取项目-标段-站点树
export function queryProjectTree(query) {
  return request({
    url: "/base/bsBd/projectTreeList",
    method: "get",
    params: query
  });
}
// 根据获取项目-标段-期数树
export function queryBdQsTree(query) {
  return request({
    url: "/base/bsBd/bdQsTreeList",
    method: "get",
    params: query
  });
}
// 根据获取项目-标段-供应商树
export function querySupplierTreeList(query) {
  return request({
    url: "/base/bsBd/supplierTreeList",
    method: "get",
    params: query
  });
}

// 查询标段详细
export function getBsBd(id) {
  return request({
    url: "/base/bsBd/" + id,
    method: "get"
  });
}

// 根站点id获取详细信息，工序报验用:
export function queryBdInfoByZdId(zdId) {
  return request({
    url: "/base/bsBd/getInfo/" + zdId,
    method: "get"
  });
}

// 新增标段
export function addBsBd(data) {
  return request({
    url: "/base/bsBd",
    method: "post",
    data: data
  });
}

// 修改标段
export function updateBsBd(data) {
  return request({
    url: "/base/bsBd",
    method: "put",
    data: data
  });
}

// 删除标段
export function delBsBd(id) {
  return request({
    url: "/base/bsBd/" + id,
    method: "delete"
  });
}
